package cn.com.connext.scrm.config;

import io.github.jhipster.config.JHipsterProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Properties specific to JHipster.
 * <p>
 * <p>
 * Properties are configured in the application.yml file.
 * </p>
 */
@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
public class ApplicationProperties {

    private final OauthCache oauthCache = new OauthCache();

    private final Mail mail = new Mail();

//    private MultipleDatabase[] multipleDatabase;

    public OauthCache getOauthCache() {
        return oauthCache;
    }

    public Mail getMail() {
        return mail;
    }
//
//    public MultipleDatabase[] getMultipleDatabase() {
//        return multipleDatabase;
//    }
//
//    public void setMultipleDatabase(MultipleDatabase[] multipleDatabase) {
//        this.multipleDatabase = multipleDatabase;
//    }

    public static class OauthCache {

        private final JHipsterProperties.Cache.Ehcache ehcache = new JHipsterProperties.Cache.Ehcache();

        public JHipsterProperties.Cache.Ehcache getEhcache() {
            return ehcache;
        }

    }

    public static class Mail {

        private String from = "";
        private String baseUrl = "";
        private String personal = "";

        public String getFrom() {
            return from;
        }

        public String getBaseUrl() {
            return baseUrl;
        }

        public String getPersonal() {
            return personal;
        }

        public void setFrom(String from) {
            this.from = from;
        }

        public void setBaseUrl(String baseUrl) {
            this.baseUrl = baseUrl;
        }

        public void setPersonal(String personal) {
            this.personal = personal;
        }
    }

}
